{% extends "base.html" %}
{% block head %}
  {% if article.keywords %}
    <meta name="keywords" contents="{{ article.keywords }}" />
  {% endif %}
  {% if article.description %}
    <meta name="description" contents="{{article.description}}" />
  {% endif %}
  {% for tag in article.tags %}
    <meta name="tags" contents="{{tag}}" />
  {% endfor %}
    <title>{% block title %}{{ article.title }}{% endblock %}</title>
    <link href="/theme/css/syntax.css" rel="stylesheet">
    <link href="/theme/css/lightbox.css" rel="stylesheet">
    <script src="http://cdn.bootcss.com/jquery/2.0.3/jquery.min.js"></script>
    <script src="/theme/js/lightbox.js"></script>
    <link rel="canonical" href="{{ SITEURL }}/{{ article.url }}" />
{% endblock %}

{% block content %}
<section id="content" class="body">
  <header>
    <h2 class="entry-title">
      <a href="#" rel="bookmark"
         title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(article) }}
  </header>
  <footer class="post-info">
                    <span class="glyphicon glyphicon-user"></span> {{ article.author }}
                    · <span class="glyphicon glyphicon-calendar"></span> {{ article.date|strftime("%Y.%m.%d") }}
                    · <span class="glyphicon glyphicon-folder-close"></span> <a href="{{SITEURL}}/{{ article.category.url }}" rel="category" title="category:{{article.category}}" > {{ article.category }}</a>
                    · <span class="glyphicon glyphicon-tags"></span>  {% for tag in article.tags %}<a href="{{SITEURL}}/{{tag.url}}" rel="tag" title="tag:{{tag.name}}"> {{tag.name}} / </a>{% endfor %}
              </footer><!-- /.post-info -->
  <div class="entry-content">
    {{ article.content }}
  </div><!-- /.entry-content -->
  <div class="end-article">- END -</div>
    <div class="shares">
      <div class="wumii-hook"></div>
    </div>
{% if False %}
        <a href="javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e(d.location.href)+'&title='+e(d.title)+'&sel='+e(s)+'&v=1',w=450,h=330,x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width='+w+',height='+h+',left='+(screen.width-w)/2+',top='+(screen.height-h)/2))location.href=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()"><img src="http://img3.douban.com/pics/douban-icons/favicon_24x24.png" alt="推荐到豆瓣" /></a>
{% endif %}
  <div class="asset-footer">
  <ul>
    <li>版权声明：自由转载-非商用-非衍生-保持署名 | <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.zh">Creative Commons BY-NC-ND 3.0</a></li>
    <li>
      原文网址：<a href="{{ SITEURL }}/{{ article.url }}">{{ SITEURL }}/{{ article.url }}</a>
    </li>
  </ul>
  </div>
<div class="neighbors">
  <ul class="neighbors">
{% if article.prev_article %}
    <li class="prev">
        <a href="{{ SITEURL }}/{{ article.prev_article.url}}" rel="prev" title="prev post">
            <i class="fa fa-arrow-circle-o-left"></i> {{ article.prev_article.title }}
        </a>
    </li>
{% else %}
    <li class="prev">
      <a href="javascript:alert('No more posts!')" title="first post" rel="prev">已经是第一篇</a>
    </li>
{% endif %}
{% if article.next_article %}
    <li class="next">
      <a href="{{ SITEURL }}/{{ article.next_article.url}}" rel="next" title="next post">
        {{ article.next_article.title }} <i class="fa fa-arrow-circle-o-right"></i>&nbsp;
      </a>
    </li>
{% else %}
    <li class="next">
      <a href="javascript:alert('That\'s the end!')" title="last post" rel="next" >已经是最后一篇</a>
    </li>
{% endif %}
</ul>
<div style="clear: both"></div>
</div>
<div id="disqus_thread"></div>
<script type="text/javascript" id="wumiiComments">
	var wumiiPermaLink = "{{SITEURL}}/{{ article.url }}"; 
	var wumiiTitle = "{{ article.title }}"; 
	var wumiiTags = "{{ article.tags | join(',')}}"; 
	var wumiiCategories = ["{{ article.category }}"]; 
	var wumiiSitePrefix = "http://defsniky.com/";
  //var wumiiParams = "&num=5&mode=3&pf=JAVASCRIPT";
</script>
{% if 0%}
<script type="text/javascript" src="http://widget.wumii.cn/ext/cw/widget"></script>
<script type="text/javascript" src="http://widget.wumii.cn/ext/relatedItemsWidget"></script>
<a href="http://www.wumii.com/widget/relatedItems" style="border:0;">
    <img src="http://static.wumii.cn/images/pixel.png" alt="无觅关联推荐，快速提升流量" style="border:0;padding:0;margin:0;" />
</a>
<style>
.wumii-related-items-div{display:none}
</style>
{% endif %}
{% if True %}
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'sniky'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{% endif %}
</div>
{% if False %}
<!-- UJian Button BEGIN -->
<script type="text/javascript">var ujian_config = {mouseoverColor:'#384E78',textColor:'#384E78',hoverTextColor:'#FFFFFF'};</script>
<script type="text/javascript" src="http://v1.ujian.cc/code/ujian.js?type=slide&num=7&fade=1&uid=1886942"></script>
<a href="http://www.ujian.cc" style="border:0;"><img src="http://img.ujian.cc/pixel.png" alt="友荐云推荐" style="border:0;padding:0;margin:0;" /></a>
<!-- UJian Button END -->
{% endif %}
<!--<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"8","bdPos":"left","bdTop":"180"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>-->
<div style="clear: both"></div>
</section>
{% endblock %}
